﻿@model IEnumerable<Irandeb4.Models.Product>

@{
    ViewBag.Title = "Index";
}

<h2>Productos</h2>

<p>
    @Html.ActionLink("Registrar Nuevo", "Create")
</p>
<table>
    <tr>
        <th>
            Nombre
        </th>
        <th>
            Tipo
        </th>
        <th>
            Descripción
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Type)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            @Html.ActionLink("Modificar", "Edit", new { id=item.ProductId }) |
            @Html.ActionLink("Ver", "Details", new { id=item.ProductId }) |
            @Html.ActionLink("Eliminar", "Delete", new { id=item.ProductId })
        </td>
    </tr>
}

</table>
